<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@page import="iwpl.project.entities.Forms"%>
<%@page import="iwpl.project.dao.FormsDAO"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<center>
<script language="JavaScript">
function checkinput(){
	if(document.frmInsertForm.txtFormName.value==""){
		alert("Invalid Form Name!");
		document.frmInsertForm.txtFormName.focus();
		return false;
	}
	if(document.frmInsertForm.txtFormName.value==null){
		alert("Nhập Ngày Tạo!");
		document.frmInsertForm.txtFormName.focus();
		return false;
	}
	return true;
}
</script>
	<script type="text/javascript">
	function Editting() 
	{
		var text = confirm("Are you sure ?");

		if (text == true) {
			//alert("Okey, Deleted !!!");
			location.href = "./servlet/Control_Form?Delete=" + id+"&action=Delete";
		} 
		else {
			alert("What ever !!!");
		}
	}
</script>
	<html>
		<head>
			<base href="<%=basePath%>">
<script type="text/javascript" src="js/jquery-Source.js"></script>
		<script type="text/javascript" src="js/jquery-Validation.js"></script>
		<link href="css/CommonCSS.css" rel="stylesheet" type="text/css" />
		<script type="text/javascript">
			$(document).ready(function() {
				$("#Department").validate();
			});
		</script>
			<title>InsertForm</title>

			<meta http-equiv="pragma" content="no-cache">
			<meta http-equiv="cache-control" content="no-cache">
			<meta http-equiv="expires" content="0">
			<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
			<meta http-equiv="description" content="This is my page">
			<!--
	<link rel="stylesheet" type="text/css" href="styles.css">
	-->
			<style type="text/css">
.style1 {
	width: 100%;
	height: 142px;
}

.style2 {
	width: 55px;
}
</style>
		</head>

		<body>
		<form name="frmInsertForm" id ="Department"action="./servlet/Control_Form" method="get">
			<table cellpadding="0" cellspacing="0">
				<tr>
					
					<td>
						<%
							String ms = " ";
								if(request.getParameter("message")!=null)
								{
									 ms = request.getParameter("message").toString();
								}
						 %>

									<table>
										<tr>
											<td colspan="3" align="center">
												<h2>
													Insert Form
												</h2>

											</td>
										</tr>
										<tr>

											<td colspan="3">
											<input type="hidden" name="action" value="Insert" />
												<input type="hidden" name="hiddenFid"  />
											</td>
										</tr>
										<tr>
											<td>
												FormName:
											</td>
											<td colspan="2">
												<input type="text" class="required" name="txtFormName"  />
											</td>
										</tr>

										<tr>
											<td>
												<input type="submit" name="btnSave" value="Save" />
											</td>
											<td>
												<input type="button" name="btnCancel" value="Back" 
												onClick="self.location='Manage_Forms.jsp'"
												/>
												
												<input type="text" name="txtMessage" value="<%=ms%>" />
											</td>
										</tr>
										<tr>
											<td colspan="3">
												<%
													if(request.getParameter("message")!=null)
													{
														String a = request.getParameter("message").toString();
														out.print(a);
													}
												 %>
											</td>
										</tr>
									</table>

								</td>
							</tr>
						</table>
			
</form>
		</body>
	</html>
</center>